# -*- codeing = utf-8 -*-
# @Time : 2024/7/19 17:29
# @Author:北希
# @File :txt.py
# @Software: PyCharm
a={'c':2,'b':1,'a':3}
a= sorted(a.items(),key=lambda x:x[0])
b = [1,[2,3]]


while 1 :
    c = int(input())
    if c<5 :
        i=0
    elif c<10:
        i=1
    print(i)